x86: Handle 'self-IPI' on legacy UP systems with no APIC.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 10 Sep 2007 16:49:58 +0000 (17:49 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 10 Sep 2007 16:49:58 +0000 (17:49 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/smp.c

index 31fc8adbe6f283ff5419e92241f0be12ac9f92ff..1d83a3aba36f831b535c43ed4176bea7817cee37 100644 (file)
@@ -279,6 +279,19 @@ int on_selected_cpus(
 
     ASSERT(local_irq_is_enabled());
 
+    /* Legacy UP system with no APIC to deliver IPIs? */
+    if ( unlikely(!cpu_has_apic) )
+    {
+        ASSERT(num_online_cpus() == 1);
+        if ( cpu_isset(0, selected) )
+        {
+            local_irq_disable();
+            func(info);
+            local_irq_enable();
+        }
+        return 0;
+    }
+
     if ( nr_cpus == 0 )
         return 0;